package com.java1412.service.impl;

import com.java1412.service.RedisService;
import com.java1412.util.RedisUtil;
import org.springframework.stereotype.Service;

/**
 * @author java1412
 * @create 2021-07-02 14:46
 */
@Service
public class RedisServiceImpl implements RedisService {

    @Override
    public void setObj(String key, Object obj, long timeout) {
        RedisUtil.set(key, obj, timeout);
    }

    @Override
    public Object getObj(String key) {
        return RedisUtil.get(key);
    }
}
